/*
* @author : TF-BJ-C064
* @creation : 2014-6-26 下午9:19:22
* @description : 
*
*/

package com.service.impl;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import com.base.UserBean;
import com.bean.Money;
import com.bean.ParkOrder;
import com.bean.Parkinfo;
import com.bean.StatusOrder;
import com.bean.UserCreditRecord;
import com.bean.Userinfo;
import com.dao.OrderStatisticsDao;
import com.dao.ParkOrderDao;
import com.tool.RegexTool;

public class OrderStatisticsServiceImpl implements com.service.OrderStatisticsService {
	private Logger log = Logger.getLogger(PayStatisticsServiceImpl.class);
	private static String Tag = PayStatisticsServiceImpl.class.getName();
	OrderStatisticsDao	dao;
	@Override
	public Object get(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Object> query(Object object) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String add(Object object) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String update(Object object) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String delete(Integer id, Integer flag) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object get(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	public OrderStatisticsDao getDao() {
		return dao;
	}

	public void setDao(OrderStatisticsDao dao) {
		this.dao = dao;
	}

	@Override
	public List<ParkOrder> MyOrderstatis(ParkOrder parkOrder) {
		return dao.MyOrderstatis(parkOrder);
	}

	@Override
	public List<ParkOrder> Orderstatis(ParkOrder parkOrder) {
		return dao.Orderstatis(parkOrder);
	}

	@Override
	public String queryByDay(List<ParkOrder> payInOut, List<Money> moneyList,
			String daytime, Long userId) throws Exception {
		if(RegexTool.checkDateTime(daytime)){
			return dao.queryByDay(payInOut, moneyList, daytime, userId);
		}else{
			return "日期错误";
		}
	}

	@Override
	public Long[][] queryByWeek(List<ParkOrder> payInOut,
			List<Money> moneyList, Map<Double, Double> paylistInOutByDay,
			String weektime, Long userId) throws Exception {
		if(RegexTool.checkDateTime(weektime)){
			return dao.queryByWeek(payInOut, moneyList, paylistInOutByDay, weektime, userId);
		}else{
			log.error(this.getClass()+".queryByYear() 日期错误");
			return null;// "日期错误";
		}
	}

	@Override
	public Long[][] queryByMonth(List<ParkOrder> payInOut,
			List<Money> moneyList, Map<Double, Double> paylistInOutByDay,
			String daytime, Long userId) throws Exception {
		if(RegexTool.checkMonth(daytime)){
			return dao.queryByMonth(payInOut, moneyList, paylistInOutByDay, daytime, userId);
		}else{
			return null;// "日期错误";
		}
	}

	@Override
	public Double[][] queryByYear(List<ParkOrder> payInOut,
			List<Money> moneyList, Map<Double, Double> paylistInOutByMonth,
			String daytime, Long userId) throws Exception {
		if(RegexTool.checkYear(daytime)){
			return dao.queryByYear(payInOut, moneyList, paylistInOutByMonth, daytime, userId);
		}else{
			log.error(this.getClass()+".queryByYear() 日期错误");
			return null;// "日期错误";
		}
	}

	@Override
	public String queryByDayo(List<StatusOrder> payInOut,List<ParkOrder> payStat,
			String daytime, Long userId) throws Exception {
		if(RegexTool.checkDateTime(daytime)){
			return dao.queryByDayo(payInOut,payStat, daytime, userId);
		}else{
			return "日期错误";
		}
	}

	@Override
	public Long[][] queryByWeeko(List<StatusOrder> payInOut,List<ParkOrder> payStat,
		 Map<Double, Double> paylistInOutByDay,
			String weektime, Long userId) throws Exception {
		if(RegexTool.checkDateTime(weektime)){
			return dao.queryByWeeko(payInOut,payStat, paylistInOutByDay, weektime, userId);
		}else{
			log.error(this.getClass()+".queryByYear() 日期错误");
			return null;// "日期错误";
		}
	}

	@Override
	public Long[][] queryByMontho(List<StatusOrder> payInOut,List<ParkOrder> payStat,
			Map<Double, Double> paylistInOutByDay,
			String daytime, Long userId) throws Exception {
		if(RegexTool.checkMonth(daytime)){
			return dao.queryByMontho(payInOut,payStat, paylistInOutByDay, daytime, userId);
		}else{
			return null;// "日期错误";
		}
	}

	@Override
	public Long[][] queryByYearo(List<StatusOrder> payInOut,List<ParkOrder> payStat,
			 Map<Double, Double> paylistInOutByMonth,
			String daytime, Long userId) throws Exception {
		if(RegexTool.checkYear(daytime)){
			return dao.queryByYearo(payInOut,payStat, paylistInOutByMonth, daytime, userId);
		}else{
			log.error(this.getClass()+".queryByYear() 日期错误");
			return null;// "日期错误";
		}
	}

	@Override
	public List Year(String yeartime) {
		try {
			return dao.Year(yeartime);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	
}
